package com.spz.demo.scloud.provider.zk.controller;

import com.spz.demo.scloud.common.core.bean.RestBean;
import com.spz.demo.scloud.common.service.AppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("")
public class IndexController {

    @Autowired
    private AppService appService;

    /**
     * 获取项目信息
     * @return
     */
    @RequestMapping("/projectInfo")
    public RestBean projectInfo(){
        String msg = appService.instanceNameAndPort();
        return RestBean.ok(msg);
    }

}
